package com.bifang.module.file.common.enums;

/**
 * 文件保密级别
 *
 * @author chenzh
 * @date 2019-08-12
 */
public enum FileSecrecyLevelEnum {
    open("0", "公开"),
    secret("10", "秘密"),
    confidential("20", "机密"),
    topSecret("30", "绝密");
    private String type;
    private String name;

    FileSecrecyLevelEnum(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public String getType() {
        return this.type;
    }

    public String getName() {
        return this.name;
    }

    public static FileSecrecyLevelEnum getByType(String type) {

        for (FileSecrecyLevelEnum typeEnum : values()) {
            if (typeEnum.getType() == type) {
                return typeEnum;
            }
        }
        return null;
    }
}
